When time-series signals such as audio signals and video information are transmitted on a communication channel or recorded on an information recording medium, it is effective in terms of transmission efficiency or recording efficiency to transmit or record the time-series signals after they are converted to compressed codes. In recent years, increasing use of broadband access and increasing capacity of storage devices have caused greater importance to lossless compression encoding methods that allow the original signal to be reproduced losslessly, rather than lossy compression encoding methods that place the highest priority on high compression rates (refer to non-patent literature 1, for example). In those circumstances, a technology for performing lossless compression encoding of audio signals by using element technologies such as linear prediction analysis has been approved by the Moving Picture Expert Group (MPEG) as an international standard named MPEG-4 ALS (refer to non-patent literature 2, for example).
FIG. 1 is a block diagram illustrating the functional configuration of an encoder 2100 using a conventional lossless compression encoding method. FIG. 2 is a block diagram illustrating the functional configuration of a residual encoding unit 2120 shown in FIG. 1. FIG. 3 is a block diagram illustrating the functional configuration of a decoder 2200 using the conventional lossless compression encoding method. FIG. 4 is a block diagram illustrating the functional configuration of a residual decoding unit 2220 shown in FIG. 3.
The conventional lossless compression encoding method will be described next with reference to those figures.
<Encoding Method>
A frame buffer 2111 of the encoder 2100 receives time-series signals x(n) which are sampled and quantized in the form of pulse code modulation (PCM) (n is an index indicating discrete time). The frame buffer 2111 buffers the time-series signals x(n) (n=1, . . . , N, N is a positive integer) of a predetermined time segment (hereinafter called a frame). The buffered time-series signals x(n) (n=1, . . . , N) of a single frame are sent to a linear prediction analysis unit 2112 of a prediction encoding unit 2110, and the linear prediction analysis unit 2112 calculates PARCOR coefficients k(m) (m=1, 2, . . . , M) of the first to M-th order by linear prediction analysis and outputs the coefficients.
The linear prediction analysis assumes that a linear combination between the time-series signal x(n) at a time n, values obtained by weighting the time-series signals x(n−1), x(n−2), . . . , x(n−M) at M points n−1, n−2, . . . , n−M (M is a positive integer and is referred to as a prediction order) preceding the time n by corresponding coefficients α(m) (m=1, . . . , M) (linear prediction coefficients), and a prediction residual e(n) (sometimes referred to as prediction error), is held. A linear prediction model based on this assumption is given below. In the linear prediction analysis, linear prediction coefficients α(m) (m=1, . . . , M) that minimize the power of the prediction residuals e(n) (n=1, . . . , N), or PARCOR coefficients k(m) (m=1, . . . , M) or other coefficients that can be converted to the linear prediction coefficients are calculated with respect to the input time-series signals x(n) (n=1, . . . , N).e(n)=x(n)+α(1)·x(n−1)+α(2)·x(n−2)+ . . . +α(M)·x(n−M)
Linear prediction analysis methods include sequential methods such as the Levinson-Durbin method and the Burg method, as well as methods of solving each simultaneous equation of each prediction order (the simultaneous equation whose solutions are linear prediction coefficients that minimizes the prediction residual) such as the autocorrelation method and the covariance method.
A linear finite impulse response (FIR) filter that estimates a time-series signal y(n) at a time n by using the time-series signals x(n−1), x(n−2), . . . , x(n−M) at M points n−1, n−2, . . . , n−M preceding the time n in accordance with the equation given below is called a linear prediction filter.y(n)=−{α(1)·x(n−1)+α(2)·x(n−2)+ . . . +α(M)·x(n−M)}
The calculated PARCOR coefficients k(m) (m=1, . . . , M) are sent to a quantizer 2113, where they are quantized to quantized PARCOR coefficients i(m) (m=1, . . . , M). The quantized PARCOR coefficients may be the quantized values of the PARCOR coefficients or may be indices assigned to the quantized values of the PARCOR coefficients. The quantized PARCOR coefficients i(m) (m=1, . . . , M) are sent to a coefficient encoding unit 2114, where they are subjected to variable length coding. The quantized PARCOR coefficients i(m) (m=1, . . . , M) are also sent to a linear prediction coefficient converter 2115, and by using them, the linear prediction coefficient converter 2115 calculates linear prediction coefficients α(m) (m=1, 2, . . . , M). A linear prediction unit 2016 generates linear prediction values y(n) (n=1, . . . , N) from the time-series signals x(n) (n=1, . . . , N) of a single frame and the corresponding linear prediction coefficients α(m) (m=1, . . . , M), by using the linear prediction filter, and a subtractor 2117 calculates prediction residuals e(n) by subtracting the linear prediction values y(n) from the time-series signals x(n) (prediction filter processing).
The calculated prediction residuals e(n) are integers within a predetermined range. For example, if the input time-series signals x(n) are represented by integers with a finite number of bits and if the linear prediction values y(n) are the output values of a linear prediction filter where the filter coefficients are integer linear prediction coefficients obtained, for example, by rounding off decimal places, the prediction residuals e(n) in integer representation with a finite number of bits (represented by integers within a predetermined range) can be obtained by subtracting the linear prediction values y(n) from the time-series signals x(n). If the time-series signals x(n) and the linear prediction values y(n) are not represented by integers, the prediction residuals e(n) may be obtained by expressing the differences calculated by subtracting the linear prediction values y(n) from the time-series signals x(n), with integers having a finite number of bits. The residual encoding unit 2120 performs Golomb-Rice coding of the prediction residuals e(n) (n=1, . . . , N) in integer representation. In Golomb-Rice coding, a Rice parameter calculator 2121 generates an integer Rice parameter s from the input prediction residuals e(n) (n=1, . . . , N). The optimum value of the Rice parameter s depends on the amplitude of the input prediction residuals e(n) (depends on the average amplitude of one or more prediction residuals e(n) corresponding to a given time segment, for example), as described below. The Rice parameter s may be generated for each frame or for each subframe, which is a time segment obtained by subdividing the frame.
The prediction residuals e(n) (n=1, . . . , N) and the Rice parameter s are input to a separation calculator 2122a of a Golomb-Rice coding unit 2122. By performing predetermined divisions using them, the separation calculator 2122a obtains integer quotients q(n) and information sub(n) identifying the corresponding remainders. The divisions are basically operations to divide the prediction residuals e(n) by a modulus 2s. Because of the necessity of distinguishing between positive and negative values of the prediction residuals e(n), reduction of the code length, and so on, some modifications may be added to the operations to divide the prediction residuals e(n) simply by the modulus 2s. If the modulus is a power of 2 and if the dividends are integers in binary representation, the divisions are the processing of deleting the low-order bits from the dividends represented by a plurality of bits, the quotients are the high-order bits of the dividends represented by the plurality of bits, and the remainders are the low-order bits of the dividends represented by the plurality of bits, respectively.
An alpha coding unit 2122b performs Alpha coding (sometimes referred to as Unary coding) of the quotients q(n) and generates information prefix(n). The generated information prefix(n) and the information sub(n) are input to a combining unit 2122c, and the combining unit 2122c outputs their respective connected bits prefix(n)|sub(n) as residual codes Ce corresponding to the prediction residuals e(n). The residual encoding unit 2120 outputs the residual codes Ce and a complementary code Cc for identifying the Rice parameter s. If the Rice parameter s is generated in each frame, for example, information indicating that the frame is not divided into subframes and the Rice parameter s itself are output as the complementary code Cc. If the Rice parameter s is generated in each subframe, the Rice parameter s generated for the first subframe, difference codes Cd obtained by performing Golomb-Rice coding of the differences between the Rice parameters s generated for adjacent subframes, and flag information indicating that the Rice parameter s is generated in each subframe are output as the complementary code C.
The coefficient code Ck generated in the prediction encoding unit 2110 and the residual codes Ce and the complementary code Cc generated in the residual encoding unit 2120 are sent to a combining unit 2130, where the codes are combined to form a code Cg.
<Decoding Method>
The code Cg input to the decoder 2200 is separated to the coefficient code Ck, the residual codes Ce, and the complementary code Cc by a separator 2210. The coefficient code Ck is input to a prediction decoding unit 2230, and the residual codes Ce and the complementary code Cc are input to the residual decoding unit 2220.
The residual decoding unit 2220 obtains the Rice parameter s from the input complementary code Cc. If the complementary code Cc includes the flag information, for example, a Rice parameter restoration unit 2222 first restores the differences between the Rice parameters s generated for adjacent subframes, from the difference codes Cd included in the complementary code Cc. The Rice parameter restoration unit 2222 then restores the Rice parameters s of the second and subsequent subframes by using the differences and the Rice parameter s of the first subframe included in the complementary code Cc. If the complementary code Cc includes information indicating that the frame is not divided into subframes, for example, the Rice parameter s included in the complementary code Cc is the Rice parameter s of the frame corresponding to the complementary code Cc. A Golomb-Rice decoding unit 2221 of the residual decoding unit 2220 separates the input residual codes Ce into information prefix(n) and information sub(n). The separated information prefix(n) is decoded to generate quotients q(n) by an alpha decoding unit 2221c. A combination calculator 2221b is given the information sub(n), the quotients q(n), and the Rice parameter s, and by using them, the combination calculator 2221b decodes the prediction residuals e(n).
The coefficient code Ck input to the prediction decoding unit 2230 is decoded to generate quantized PARCOR coefficients i(m) (m=1, . . . , M) by a coefficient decoding unit 2231. The quantized PARCOR coefficients i(m) (m=1, . . . , M) are sent to a linear prediction coefficient converter 2232, and by using them, the linear prediction coefficient converter 2232 calculates linear prediction coefficients α(m) (m=1, . . . , M) of a linear prediction filter of M-th prediction order. In a linear prediction unit 2233, a linear prediction filter generates linear prediction values y(n) (n=1, . . . , N) by using the calculated linear prediction coefficients α(m) (m=1, . . . , M) and the time-series signals x(n) (n=1, . . . , N) output earlier from an adder 2234. The adder 2234 generates time-series signals x(n) (n=1, . . . , N) by adding the linear prediction values y(n) and the prediction residuals e(n) decoded by the residual decoding unit 2220 (inverse prediction filtering).